/**
 * 职务查看js
 */
var dutiesLook={
	dataCache:null,
		
	startEvent:function(){
		dutiesLook.showInfoById();
	},
	
	showInfoById:function(){
		var lokId=art.dialog.data('lokId');  //查看id
		var url = 'mgr/DutiesCtrl/getDutiesById';
		var params ={
				'id':lokId
		};
		var cb = function(data){
			if(data.resultCode==200){
				var ret=data.result;
				for(var i in ret){
					var text=ret[i];
					if(i=='createdts'){
						text=text==null?'':(new Date(text)).format('yyyy-MM-dd');
					}
					$('#com-addForm td[name="'+i+'"]').html(text);
				}
			}
		};
		sendApiNoLoad(url, params, cb, 'POST');
	},
	
	init:function(){
		dutiesLook.startEvent();
	}
}
$(document).ready(function() {
	dutiesLook.init();
});